<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <!--include head-->
        <%- include("../general/head.html", undefined) %>
        <!--end of include head-->
    </head>
    <body>
        <!--jumbotron-->
        <%- include("../general/jumbotron.html", undefined) %>
        <!--jumbotron-->
        <!--container-fluid-->
        <div class="container-fluid">
            <!--classifications row-->
            <div class="row">
                <!--include classifications-->
                <%- include("../general/classifications.html", undefined) %>
                <!--end-->
            </div>
            <!--end of classifications row-->
            <!--contents row-->
            <div class="contents-row row">
                <div class="col-md-4 col-md-offset-4 col-sm-8 col-sm-offset-2">
                    <% for (var i = 0; i < articles.length; i++) { %>
                    <div class="article-row row">
                        <div class="col-md-12">
                            <div class="media">
                                <div class="media-body">
                                    <h4 class="medis-heading">
                                        <a href="/articles/<%= articles[i].id %>">
                                            <span class="article-row-title"><%= articles[i].title %></span>
                                        </a>
                                        &nbsp<span>#<%= articles[i].tag %></span>
                                    </h4>
                                    <%
                                        var time = new Date(articles[i].createAt);
                                        var timeString = [
                                            time.getFullYear(),
                                            time.getMonth() + 1,
                                            time.getDate()
                                        ].join(" / ");
                                    %>
                                    <p class="article-row-author">By <%= articles[i].author %> at <%= timeString %></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <% } %>
                </div>
                <div class="col-md-4 col-sm-2"></div>
            </div>
            <!--end of contents row-->
            <!--page row-->
            <div class="page-row row">
                <%- include("../general/page.html", undefined) %>
            </div>
            <!--end of page row-->
        </div>
        <!--end of container-fluid-->
        <!--import javascripts-->
        <%- include("../general/javascripts.html", undefined) %>
		<!--end of import javascripts-->
    </body>
</html>
